package com.shensi.api.admin.client.customer;

import com.shensi.api.admin.client.fallback.customer.CustomerCardSettingClientFallBack;
import com.shensi.api.admin.domian.customer.dto.CustomerCardSettingDto;
import com.shensi.common.core.annotation.Log;
import com.shensi.common.core.constant.CloudConstant;
import com.shensi.common.core.domain.AjaxResult;
import com.shensi.common.core.enums.BusinessType;
import com.shensi.common.core.page.TableDataInfo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.cloud.openfeign.SpringQueryMap;
import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;

/**
 * @author: budian
 * @since: 2023/11/30
 */
@FeignClient(
        value = CloudConstant.ADMIN_SERVER,
        fallbackFactory = CustomerCardSettingClientFallBack.class)
@Component
public interface CustomerCardSettingClient {

    /**
     * 查询客户电子会员卡充值优惠设置列表
     */
    @GetMapping("/customer/cardsetting/list")
    public TableDataInfo list(@SpringQueryMap CustomerCardSettingDto customerCardSetting);

    /**
     * 查询客户电子会员卡充值优惠设置列表
     */
    @GetMapping("/customer/cardsetting/listSetting")
    public AjaxResult listSetting(@SpringQueryMap CustomerCardSettingDto customerCardSetting);

    /**
     * 导出客户电子会员卡充值优惠设置列表
     */
    @Log(title = "客户电子会员卡充值优惠设置", businessType = BusinessType.EXPORT)
    @GetMapping("/customer/cardsetting/export")
    public AjaxResult export(@SpringQueryMap CustomerCardSettingDto customerCardSetting);

    /**
     * 获取客户电子会员卡充值优惠设置详细信息
     */
    @GetMapping(value = "/customer/cardsetting/{id}")
    public AjaxResult getInfo(@PathVariable("id") Long id);

    /**
     * 获取电子卡的信息
     */
    @GetMapping(value = "/customer/cardsetting/settingInfo/{id}")
    public AjaxResult settingInfo(@PathVariable("id") Long id);

    /**
     * 新增客户电子会员卡充值优惠设置
     */
    @PostMapping("/customer/cardsetting")
    public AjaxResult add(@RequestBody CustomerCardSettingDto customerCardSetting);

    /**
     * 新增客户电子会员卡充值优惠设置
     */
    @PostMapping(value = "/customer/cardsetting/addSetting")
    public AjaxResult addSetting(@RequestBody CustomerCardSettingDto customerCardSetting);

    /**
     * 修改客户电子会员卡充值优惠设置
     */
    @PutMapping("/customer/cardsetting")
    public AjaxResult edit(@RequestBody CustomerCardSettingDto customerCardSetting);
    /**
     * 修改客户电子会员卡充值优惠设置
     */
    @PostMapping(value = "/customer/cardsetting/editSetting")
    public AjaxResult editSetting(@RequestBody CustomerCardSettingDto customerCardSetting);

    /**
     * 删除客户电子会员卡充值优惠设置
     */
    @DeleteMapping("/customer/cardsetting/{ids}")
    public AjaxResult remove(@PathVariable("ids") Long[] ids);

    /**
     * 查询油站电子卡规则设置
     * @param customerCardSetting
     * @return
     */
    @GetMapping(value = "/customer/cardsetting/selectCustomerCardSetting")
    public AjaxResult selectCustomerCardSetting(@SpringQueryMap CustomerCardSettingDto customerCardSetting);

    /**
     * 查询电子卡是否启用
     */
    @GetMapping(value = "/customer/cardsetting/selectCardOpen")
    public AjaxResult selectCardOpen(@SpringQueryMap CustomerCardSettingDto customerCardSetting);

}
